#ifndef _BUOLA_NET_GDATA_CSERVICE_H_
#define _BUOLA_NET_GDATA_CSERVICE_H_

#include <buola/buola.h>

namespace buola { namespace io { namespace gdata {

class CService
{
public:
    CService();
    virtual ~CService();

    bool Authenticate(const std::string &pName,const std::string &pPass);

    bool IsAuthenticated()  {   return !mAuth.empty();  }

    void Query(const CURI &pURI,int pRedirects=5);

protected:
    const std::string &GetToken()   {   return mAuth;   }
    //    CFeed *Query()
private:
    virtual const char *GetServiceAuthCode()=0;

    std::string mAuth;
    std::string mGSessionId;
};

/*namespace gdata*/ } /*namespace io*/ } /*namespace buola*/ }

#endif
